FROM mysql:5.7

RUN chown -R mysql:root /var/lib/mysql/

ARG MYSQL_ROOT_PASSWORD=root
ENV MYSQL_ROOT_PASSWORD=$MYSQL_ROOT_PASSWORD
ENV LANG=C.UTF-8

COPY docker/mysql/database.sql /docker-entrypoint-initdb.d/
CMD ["mysqld", "--character-set-server=utf8mb4", "--collation-server=utf8mb4_unicode_ci"]
EXPOSE 3306
